package com.aabte.auth.account.resource.api;

import com.aabte.commons.errorcode.BusinessExceptionAssert;
import org.springframework.http.HttpStatus;

public enum AccountCode implements BusinessExceptionAssert {
    /**
     * Account exist
     */
    ACCOUNT_EXIST(HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.value(), "account exist."),
    ACCOUNT_NOT_EXIST(HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.value(), "account not exist."),
    ACCOUNT_NOT_EXIST_OR_PASSWORD_INCORRECT_EXIST(HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.value(), "account not exist or password incorrect.");

    private int status;
    private int code;
    private String message;

    @Override
    public int status() {
        return status;
    }

    @Override
    public int code() {
        return code;
    }

    @Override
    public String message() {
        return message;
    }

    AccountCode(int status, int code, String message) {
        this.status = status;
        this.code = code;
        this.message = message;
    }
}
